Optimal. Leaf size=154 \[ \frac {2 d f p x}{3 e}-\frac {2 d^2 g p x}{5 e^2}-\frac {2}{9} f p x^3+\frac {2 d g p x^3}{15 e}-\frac {2}{25} g p x^5-\frac {2 d^{3/2} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+\frac {2 d^{5/2} g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{5 e^{5/2}}+\frac {1}{3} f x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g x^5 \log \left (c \left (d+e x^2\right )^p\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {2526, 2505,
308, 211} \begin {gather*} -\frac {2 d^{3/2} f p \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+\frac {2 d^{5/2} g p \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{5 e^{5/2}}+\frac {1}{3} f x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g x^5 \log \left (c \left (d+e x^2\right )^p\right )-\frac {2 d^2 g p x}{5 e^2}+\frac {2 d f p x}{3 e}+\frac {2 d g p x^3}{15 e}-\frac {2}{9} f p x^3-\frac {2}{25} g p x^5 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 308
Rule 2505
Rule 2526
Rubi steps
\begin {align*} \int x^2 \left (f+g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right ) \, dx &=\int \left (f x^2 \log \left (c \left (d+e x^2\right )^p\right )+g x^4 \log \left (c \left (d+e x^2\right )^p\right )\right ) \, dx\\ &=f \int x^2 \log \left (c \left (d+e x^2\right )^p\right ) \, dx+g \int x^4 \log \left (c \left (d+e x^2\right )^p\right ) \, dx\\ &=\frac {1}{3} f x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g x^5 \log \left (c \left (d+e x^2\right )^p\right )-\frac {1}{3} (2 e f p) \int \frac {x^4}{d+e x^2} \, dx-\frac {1}{5} (2 e g p) \int \frac {x^6}{d+e x^2} \, dx\\ &=\frac {1}{3} f x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g x^5 \log \left (c \left (d+e x^2\right )^p\right )-\frac {1}{3} (2 e f p) \int \left (-\frac {d}{e^2}+\frac {x^2}{e}+\frac {d^2}{e^2 \left (d+e x^2\right )}\right ) \, dx-\frac {1}{5} (2 e g p) \int \left (\frac {d^2}{e^3}-\frac {d x^2}{e^2}+\frac {x^4}{e}-\frac {d^3}{e^3 \left (d+e x^2\right )}\right ) \, dx\\ &=\frac {2 d f p x}{3 e}-\frac {2 d^2 g p x}{5 e^2}-\frac {2}{9} f p x^3+\frac {2 d g p x^3}{15 e}-\frac {2}{25} g p x^5+\frac {1}{3} f x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g x^5 \log \left (c \left (d+e x^2\right )^p\right )-\frac {\left (2 d^2 f p\right ) \int \frac {1}{d+e x^2} \, dx}{3 e}+\frac {\left (2 d^3 g p\right ) \int \frac {1}{d+e x^2} \, dx}{5 e^2}\\ &=\frac {2 d f p x}{3 e}-\frac {2 d^2 g p x}{5 e^2}-\frac {2}{9} f p x^3+\frac {2 d g p x^3}{15 e}-\frac {2}{25} g p x^5-\frac {2 d^{3/2} f p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 e^{3/2}}+\frac {2 d^{5/2} g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{5 e^{5/2}}+\frac {1}{3} f x^3 \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{5} g x^5 \log \left (c \left (d+e x^2\right )^p\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 118, normalized size = 0.77 \begin {gather*} \frac {30 d^{3/2} (-5 e f+3 d g) p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )+\sqrt {e} x \left (-2 p \left (45 d^2 g-15 d e \left (5 f+g x^2\right )+e^2 x^2 \left (25 f+9 g x^2\right )\right )+15 e^2 x^2 \left (5 f+3 g x^2\right ) \log \left (c \left (d+e x^2\right )^p\right )\right )}{225 e^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.34, size = 453, normalized size = 2.94
method | result | size |
risch | \(\left (\frac {1}{5} g \,x^{5}+\frac {1}{3} f \,x^{3}\right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )-\frac {i \pi g \,x^{5} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \right )}{10}-\frac {i \pi f \,x^{3} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \right )}{6}+\frac {i \pi f \,x^{3} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}}{6}+\frac {i \pi g \,x^{5} \mathrm {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2}}{10}+\frac {i \pi g \,x^{5} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right )}{10}-\frac {i \pi g \,x^{5} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3}}{10}+\frac {i \pi f \,x^{3} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{2} \mathrm {csgn}\left (i c \right )}{6}-\frac {i \pi f \,x^{3} \mathrm {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )^{3}}{6}+\frac {\ln \left (c \right ) g \,x^{5}}{5}-\frac {2 g p \,x^{5}}{25}+\frac {\ln \left (c \right ) f \,x^{3}}{3}+\frac {2 d g p \,x^{3}}{15 e}-\frac {2 f p \,x^{3}}{9}+\frac {\ln \left (-\sqrt {-e d}\, x +d \right ) \sqrt {-e d}\, d^{2} g p}{5 e^{3}}-\frac {\sqrt {-e d}\, p d \ln \left (-\sqrt {-e d}\, x +d \right ) f}{3 e^{2}}-\frac {\ln \left (\sqrt {-e d}\, x +d \right ) \sqrt {-e d}\, d^{2} g p}{5 e^{3}}+\frac {\sqrt {-e d}\, p d \ln \left (\sqrt {-e d}\, x +d \right ) f}{3 e^{2}}-\frac {2 d^{2} g p x}{5 e^{2}}+\frac {2 d f p x}{3 e}\) | \(453\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 111, normalized size = 0.72 \begin {gather*} \frac {2}{225} \, {\left (\frac {15 \, {\left (3 \, d^{3} g - 5 \, d^{2} f e\right )} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {7}{2}\right )}}{\sqrt {d}} - {\left (9 \, g x^{5} e^{2} - 5 \, {\left (3 \, d g e - 5 \, f e^{2}\right )} x^{3} + 15 \, {\left (3 \, d^{2} g - 5 \, d f e\right )} x\right )} e^{\left (-3\right )}\right )} p e + \frac {1}{15} \, {\left (3 \, g x^{5} + 5 \, f x^{3}\right )} \log \left ({\left (x^{2} e + d\right )}^{p} c\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 283, normalized size = 1.84 \begin {gather*} \left [-\frac {1}{225} \, {\left (90 \, d^{2} g p x - 15 \, {\left (3 \, g p x^{5} + 5 \, f p x^{3}\right )} e^{2} \log \left (x^{2} e + d\right ) - 15 \, {\left (3 \, g x^{5} + 5 \, f x^{3}\right )} e^{2} \log \left (c\right ) + 15 \, {\left (3 \, d^{2} g p - 5 \, d f p e\right )} \sqrt {-d e^{\left (-1\right )}} \log \left (\frac {x^{2} e - 2 \, \sqrt {-d e^{\left (-1\right )}} x e - d}{x^{2} e + d}\right ) + 2 \, {\left (9 \, g p x^{5} + 25 \, f p x^{3}\right )} e^{2} - 30 \, {\left (d g p x^{3} + 5 \, d f p x\right )} e\right )} e^{\left (-2\right )}, -\frac {1}{225} \, {\left (90 \, d^{2} g p x - 30 \, {\left (3 \, d^{2} g p - 5 \, d f p e\right )} \sqrt {d} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {1}{2}\right )} - 15 \, {\left (3 \, g p x^{5} + 5 \, f p x^{3}\right )} e^{2} \log \left (x^{2} e + d\right ) - 15 \, {\left (3 \, g x^{5} + 5 \, f x^{3}\right )} e^{2} \log \left (c\right ) + 2 \, {\left (9 \, g p x^{5} + 25 \, f p x^{3}\right )} e^{2} - 30 \, {\left (d g p x^{3} + 5 \, d f p x\right )} e\right )} e^{\left (-2\right )}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 320 vs.
\(2 (158) = 316\).
time = 34.48, size = 320, normalized size = 2.08 \begin {gather*} \begin {cases} \left (\frac {f x^{3}}{3} + \frac {g x^{5}}{5}\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\\left (\frac {f x^{3}}{3} + \frac {g x^{5}}{5}\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\- \frac {2 f p x^{3}}{9} + \frac {f x^{3} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{3} - \frac {2 g p x^{5}}{25} + \frac {g x^{5} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{5} & \text {for}\: d = 0 \\\frac {2 d^{3} g p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{5 e^{3} \sqrt {- \frac {d}{e}}} - \frac {d^{3} g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{5 e^{3} \sqrt {- \frac {d}{e}}} - \frac {2 d^{2} f p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{3 e^{2} \sqrt {- \frac {d}{e}}} + \frac {d^{2} f \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3 e^{2} \sqrt {- \frac {d}{e}}} - \frac {2 d^{2} g p x}{5 e^{2}} + \frac {2 d f p x}{3 e} + \frac {2 d g p x^{3}}{15 e} - \frac {2 f p x^{3}}{9} + \frac {f x^{3} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3} - \frac {2 g p x^{5}}{25} + \frac {g x^{5} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{5} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.43, size = 138, normalized size = 0.90 \begin {gather*} \frac {2 \, {\left (3 \, d^{3} g p - 5 \, d^{2} f p e\right )} \arctan \left (\frac {x e^{\frac {1}{2}}}{\sqrt {d}}\right ) e^{\left (-\frac {5}{2}\right )}}{15 \, \sqrt {d}} + \frac {1}{225} \, {\left (45 \, g p x^{5} e^{2} \log \left (x^{2} e + d\right ) - 18 \, g p x^{5} e^{2} + 45 \, g x^{5} e^{2} \log \left (c\right ) + 30 \, d g p x^{3} e + 75 \, f p x^{3} e^{2} \log \left (x^{2} e + d\right ) - 50 \, f p x^{3} e^{2} + 75 \, f x^{3} e^{2} \log \left (c\right ) - 90 \, d^{2} g p x + 150 \, d f p x e\right )} e^{\left (-2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.32, size = 126, normalized size = 0.82 \begin {gather*} \ln \left (c\,{\left (e\,x^2+d\right )}^p\right )\,\left (\frac {g\,x^5}{5}+\frac {f\,x^3}{3}\right )-x^3\,\left (\frac {2\,f\,p}{9}-\frac {2\,d\,g\,p}{15\,e}\right )-\frac {2\,g\,p\,x^5}{25}+\frac {d\,x\,\left (\frac {2\,f\,p}{3}-\frac {2\,d\,g\,p}{5\,e}\right )}{e}+\frac {2\,d^{3/2}\,p\,\mathrm {atan}\left (\frac {d^{3/2}\,\sqrt {e}\,p\,x\,\left (3\,d\,g-5\,e\,f\right )}{3\,d^3\,g\,p-5\,d^2\,e\,f\,p}\right )\,\left (3\,d\,g-5\,e\,f\right )}{15\,e^{5/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________